package com.slliver.sentinelservice.handler;


import com.alibaba.cloud.sentinel.datasource.config.NacosDataSourceProperties;
import com.alibaba.csp.sentinel.datasource.Converter;
import com.alibaba.nacos.api.config.ConfigService;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

// implements WritableDatasource<T>
public class NacosWritableDataSource<T> {

    private NacosDataSourceProperties nacosDataSourceProperties;

    private ConfigService configService;

    private final Converter<T, String> configEncoder;

    private final Lock lock = new ReentrantLock(true);

    public NacosWritableDataSource(NacosDataSourceProperties nacosDataSourceProperties,ConfigService configService,Converter<T, String> configEncoder) {
        this.nacosDataSourceProperties = nacosDataSourceProperties;
        this.configEncoder = configEncoder;

    }
}
